package PhamVanHien_LTHDT01;

public class Controllers {
private UserEntity m_objUser;
private Models m_objModels;

//ham khoi dung cho controllers
public Controllers(UserEntity objUser){
	m_objUser = objUser;
	
	//Khoi tao thong tin cho models
	m_objModels = new Models();
}
//3.uy quyen thuc thi nghiep vu thong qua Mopdels
public boolean CheckUser(){
	//dieu huong thuc thi cac nhiem vu
	//+ kiem tra su ton tai cua tai khoan
	if(m_objModels.Kiemtrasutontaicuataikhoan(m_objUser)){
		if(m_objModels.KTTTkichhoatTK(m_objUser)){
			if(m_objModels.KTsoduTK(m_objUser)){
				if(m_objModels.KTLockorUnlock(m_objUser)){
					return true;
				}
				else{
					return false;
				}
			}
			else{
				return false;
			}
		}
		else{
			return false;
		}
	}
	return false;
	
}
}
